#!/usr/bin/env Rscript

library(rncl)
library(splits)
library(svglite)

tree <- read_nexus_phylo("Limno_MCC.tree")
tree_gmyc <- gmyc(tree)
summary(gmyc)
svglite("Limno_gmyc.svg", width = 20, height = 20)
plot(tree_gmyc)
dev.off()
spec.list(tree_gmyc)
tree_support <- gmyc.support(tree_gmyc)
is.na(tree_support[tree_support == 0]) <- TRUE
svglite("Limno_gmyc.svg", width = 20, height = 20)
plot(tree, cex=.6, no.margin=TRUE)
nodelabels(round(tree_support, 2), cex=.7)
dev.off()